POV-Ray : Newsgroups : povray.unofficial.patches : Crash after 63 frames? : Re: Crash after 63 frames? Server Time
1 Jul 2024 03:12:35 EDT (-0400)
  Re: Crash after 63 frames?  
From: Scott Gammans
Date: 3 Nov 2003 11:26:19
Message: <3fa681ab$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote

>> I know there is no memory leak big
>> enough that it could cause what you claim
>> it would - for your claim to be correct
>> POV-Ray would have to forget about tens
>> of megabytes of memory per frame!

>> As POV-Ray is able to track all memory
>> used, and that tracking will show all
>> memory "Lost" and then free it anyway,
>> there is no memory leak.

I am *so* going to enjoy watching you eat your words, you arrogant
smarty-pants.

Step 1: Render the following scene with this command line:
+H1000 +W1000 +Q0 +A0.0 +AM1 +R3 -J0.0 +FC
The output should be a 1000x1000 Targa file. Name the file imagefile.tga.

// Begin file

global_settings {
    assumed_gamma 2.0
    max_trace_level 5
}

camera {
  orthographic
 location y*100
 look_at 0
 angle 90
 right x
 up y
}

#declare Granite_Texture = texture {
    pigment {
        granite
        color_map {
            [0.0 rgb 0.5]
            [0.5 rgb 0.375]
            [1.0 rgb 0.5]
        }
        scale 12
    }
    finish {ambient 1}
}

plane {y,0 texture {Granite_Texture}}

// End of file

Step 2: Render this scene with the following command line:
+W640 +H480 +Q2 -A0.0 -J0.0 +FN +UA +KFI0001 +KFF1800
The output should be a series of 1,800 PNG frames for a 60-second animation.
But unless your workstation has unlimited memory, you will never be able to
render anywhere near 1,800 frames in one pass... POV-Ray will eventually
konk out with the following parse error:

image_pattern {tga "imagefile.tga" <----ERROR
Parse Error: Out of memory.  Cannot allocate 1000 bytes for TGA image line.

On my 2.4 GHz Pentium 4 Windows XP service pack 1 workstation with 1 GB RAM
and no other applications running, it only took 7 minutes and 19 seconds for
the parse error to occur while processing frame 465. Incidentally, the same
thing happens if you repeat this test by generating a PNG file in step one
and using that output file for the texture map in step two... with the PNG
map it took 6 minutes and 39 seconds for the parse error to occur at frame
461.

As you can see, this demonstration of the memory bug was generated
completely from within POV-Ray without the use of any external image
processing programs or any other external processing. Since Thorsten has
already stated that POV-Ray does not use any external libraries for Targa
files, it follows that there must be a memory allocation problem somewhere
within POV-Ray itself.

// Begin file

global_settings {
    assumed_gamma 2.0
    max_trace_level 5
}

camera {
 location 50
 look_at 0
 angle 90
 right image_width/image_height*x
 up y
}

#declare Test_Texture = texture {
 image_pattern {tga "imagefile.tga" map_type 2}
 texture_map {
     [0.0000 pigment {color rgb <1,0,0>} finish {ambient 1}]
     [1.0000 pigment {color rgb <0,0,1>} finish {ambient 1}]
 }
 scale 50
 rotate <90,0,-90>
}

cylinder {z*25,z*-25,10 texture {Test_Texture} rotate
<-frame_number,frame_number,frame_number/2>}

// End of file


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.